<%--
  Created by IntelliJ IDEA.
  User: lenovo
  Date: 2023/3/17
  Time: 9:26
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Login/Register</title>
</head>
<body>
<h1>Login/Register</h1>
<form action="/employee" method="POST">
    <input type="hidden" name="action" value="login">
    <input type="number" name="id" placeholder="ID" required>
    <br>
    <input type="password" name="password" placeholder="PASSWORD" required>
    <br>
    <input type="submit" value="Login">
    <a href="register.jsp">Register</a>
</form>
<hr>
<%--<h1><p style="color: red"><%=session.getAttribute("message")%></p></h1>--%>
<h1><p style="color: red">${sessionScope.message}</p></h1>

<%--<h1><p style="color: red"><%=request.getAttribute("error")%></p></h1>--%>
<h1><p style="color: red">${requestScope.error}</p></h1>


<%
    application.setAttribute("application-key", "application-value");
    out.print(application.getAttribute("application-key"));
    out.print("<br>");
    session.setAttribute("session-key", "session-value");
    out.print(session.getAttribute("session-key"));
    out.print("<br>");
    request.setAttribute("request-key", "request-value");
    out.print(request.getAttribute("request-key"));
    out.print("<br>");
    pageContext.setAttribute("page-key", "page-value");
    out.print(pageContext.getAttribute("page-key"));
%>
</body>

</html>


